package com.project.weather.service;

import java.util.List;
import com.project.weather.common.PageBean;
import com.project.weather.common.AResultCode;
import com.project.weather.common.ResultMap;
import com.project.weather.pojo.UserBean;

/**
 *<p>Title:UserService.java</p>
 *<p>Description:用户信息表Service</p>
 *@author xxx
 *@version 1.0
 *@Automatically generate by Coder in 2021-12-21 16:07
 */
public interface UserService{
    /**
	*<b>Summary: 保存数据</b>
	* insert
	* @param bean
	* @return
	*/
	public ResultMap<AResultCode, UserBean> insert(UserBean bean);

	/**
    *<b>Summary: 更新数据</b>
    * update
    * @param bean
	* @return
    */
	public ResultMap<AResultCode, UserBean> update(UserBean bean);

	/**
    *<b>Summary: 删除数据</b>
    * delete
    * @param user_id
	* @return
    */
	public ResultMap<AResultCode, UserBean> delete(String user_id);

	/**
    *<b>Summary: 分页查询列表数据</b>
    * pageList
    * @param pb
	* @return
    */
	public ResultMap<AResultCode, PageBean<UserBean>> pageList(PageBean<UserBean> pb);

	/**
    *<b>Summary: 查询列表数据</b>
    * list
    * @param bean
	* @return
    */
	public ResultMap<AResultCode, List<UserBean>> list(UserBean bean);

	/**
    *<b>Summary: 根据Id查询数据</b>
    * get
    * @param user_id
	* @return
    */
	public ResultMap<AResultCode, UserBean> get(String user_id);

	/**
	 * 根据用户名密码查询
	 * @param username
	 * @param password
	 */
	ResultMap<AResultCode, UserBean> getByUserNamePassword(String username, String password);

	/**
	 * 根据用户名查询
	 * @param username
	 * @return
	 */
	ResultMap<AResultCode, UserBean> getByUserName(String username);

	/**
	 * 禁用用户
	 * @param user_id
	 * @return
	 */
	ResultMap<AResultCode, UserBean> forbid(String user_id);

	/**
	 * 启用用户
	 * @param user_id
	 * @return
	 */
	ResultMap<AResultCode, UserBean> start(String user_id);

	/**
	 * 解除管理员权限
	 * @param user_id
	 * @return
	 */
	ResultMap<AResultCode, UserBean> reliveAdmin(String user_id);

	/**
	 * 授予管理员权限
	 * @param user_id
	 * @return
	 */
	ResultMap<AResultCode, UserBean> grantAdmin(String user_id);
}